package com.example.demo.modules.customDefine.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.modules.customDefine.entity.ModuleFieldDataJson;
import com.example.demo.modules.customDefine.mapper.ModuleFieldDataJsonMapper;
import com.example.demo.modules.customDefine.service.ModuleFieldDataJsonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ModuleFieldDataJsonServiceImpl extends ServiceImpl<ModuleFieldDataJsonMapper, ModuleFieldDataJson> implements ModuleFieldDataJsonService {

    @Autowired
    private ModuleFieldDataJsonMapper moduleFieldDataJsonMapper;

    //查询所有
    @Override
    public List<ModuleFieldDataJson> listAll(QueryWrapper queryWrapper) {
        List<ModuleFieldDataJson> moduleFieldDataJsons = this.list(queryWrapper);
        return moduleFieldDataJsons;
    }

    //条件查询
        @Override
    public ModuleFieldDataJson listOne(Long id) {
        ModuleFieldDataJson moduleFieldDataJson = this.getById(id);
        return moduleFieldDataJson;
    }

    //保存
        @Override
    public int insert(ModuleFieldDataJson moduleFieldDataJson){
        return moduleFieldDataJsonMapper.insert(moduleFieldDataJson);

    }

}
